<script setup lang="ts">
import {computed} from "vue";

const props = defineProps({
  element: {
    type: Object,
    default: () => {
      return {}
    }
  }
})
const styleStr = computed(()=>{
    let styleStr = ''
    styleStr += `z-index: ${props.element.layer};`
    styleStr += props.element.style
    return styleStr;
})
</script>

<template>
  <div class="element-text" :style="styleStr">{{ element.content }}</div>
</template>

<style scoped lang="scss">
.layout-design-element {
  width: 100%;
  height: 100%;
}

.element-text {
  width: 100%;
  height: 100%;
  cursor: move;
  white-space: pre-wrap;
  overflow: hidden;
}
</style>
